|
![](/i/fill.gif) |
Hi all,
I've been making progress w/ isosurfaces, but am finding myself totally
befuddled when it comes to combining multiple functions. Here's a simple
(albeit useless) example which I would expect to work (but doesn't):
#declare fn_x = function {x}
#declare fn_y = function {y}
#declare fn_z = function {z}
#declare fn_sphere = function {fn_x^2 + fn_y^2 + fn_z^2 - 1}
isosurface {
function {fn_sphere}
threshold 0
contained_by {box {<-5,-5,-5>,<5,5,5>}}
pigment {Red}
}
This ought to yeild a sphere of radius one, but gives me nothing. What
adds to my confusion is that this type of function composition seems to
work fine for functions used in for pigments rather than iso's. Am I
missing something obvious? I've dones some experimenting, and using the
fn_* functions do impact the final surface, but in different ways than if I
used the vanilla x/y/z. My goal in this is to be able to easily wrap a
surface around a different (non-cartesian) coordinate system by
substituting the coordinate translations for x/y/z. I can do this
manually, but it is a maintenance headache and makes for really ugly
functions.
Thanks,
Ken
Post a reply to this message
|
![](/i/fill.gif) |